﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace eComet
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] argv)
        {
            if (argv.Length == 0)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new InitWin());
            }
            else
            {
                if (argv.Contains("/all"))
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new AllWin(argv));
                }
                else
                {
                    bool found = false;
                    foreach(String arg in argv)
                        if(arg.StartsWith("/own"))
                            found = true;
                    if(found)
                    {
                        Application.EnableVisualStyles();
                        Application.SetCompatibleTextRenderingDefault(false);
                        Application.Run(new NoParamsWin(argv));
                    }
                    else
                    {
                        Application.EnableVisualStyles();
                        Application.SetCompatibleTextRenderingDefault(false);
                        Application.Run(new ParamsWin(argv));
                    }
                }
            }
        }
    }
}
